﻿using System.ComponentModel;
using System.Windows;
using RIBA.Web;

namespace Admin
{
	public class TextResWrapperWrapper
	{
		private static object _textResWrapper;

		public object TextResWrapper
		{
			get { return _textResWrapper; }
		}

		public TextResWrapperWrapper()
		{
			// Create local TextResWrapper in Design Mode
			if (DesignerProperties.IsInDesignTool)
				_textResWrapper = new TextResWrapper();
			// If DLL is loaded by MainPage -> get global App_TextResourceWrapper: it will reflect Language changes !!!
			else
				_textResWrapper = Application.Current.Resources["App_TextResourceWrapper"];
		}
	}
}
